<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="upon">
    <title>登录</title>
    <link rel="icon" href="./img/favicon.ico" type="image/ico">
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js "></script>
    <link rel="stylesheet" href="./css/load.css">
</head>

<body>
    <header>
        <div class="dog">
            <span class="icon1"></span><span class="fontsize24">欢迎登录</span>
        </div>
        <div class="dog"><img src="./img/q-icon.png" alt="">登录页面，调查问卷</div>
    </header>
    <div class="orange"><img src="./img/danger.png" alt="" class="danger">依据《网络安全法》，为保障您的账户安全和正常使用，请尽快完成手机号验证！ 新版《京东隐私政策》已上线，将更有利于保护您的个人隐私。</div>
    <main>
        <img src="./img/big-bg.jpg" alt="">
    </main>

    <div class="denglu">
        <div class="saoma-zhanghao">
            <!-- Nav tabs -->
            <ul class="nav nav-tabs " role="tablist">
                <li role="presentation" class=" active "><a href="#home" aria-controls="home" role="tab" data-toggle="tab">扫描登录</a></li>
                <li style="line-height:50px;">|</li>
                <li role="presentation" class=" "><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">账户登录</a></li>
            </ul>
            <!-- Tab panes -->
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane pane1 active" id="home">
                    <img src="./img/show.png" alt="">
                    <p>打开 手机京东 扫描二维码 </p>
                    <p> <span class="r1"></span>免输入
                        <span class="r2 r1"></span>更快
                        <span class="r3 r1"></span>更安全
                    </p>
                    <div class="footer">
                        <div>
                            <section class="s"></section>QQ
                            <section class="s1 s"></section>微信</div>
                              <a href="./register.html"> <article>立即注册</article></a>
                    </div>
                </div>
                <div role="tabpanel" class="tab-pane pane2" id="profile">
                    <form class="form-inline" action="/api/v1/user/signin" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon"><span class="suo"></span></div>
                                <input type="text" class="form-control" id="username" name="username" placeholder="邮箱/用户名/已验证手机">
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon"><span class="suo suo1"></span></div>
                                <input type="password" class="form-control" name="password" id="password" placeholder="密码">
                            </div>
                        </div>
                        <section> 忘记密码</section>
                        <button type="submit">登录</button>
                    
                    </form>
                    <div class="footer">
                        <div>
                            <section class="s"></section>QQ
                            <section class="s1 s"></section>微信
                        </div>
                       <a href="./register.html"> <article>立即注册</article></a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <footer>
        <p>关于我们 | 联系我们 | 人才招聘 | 商家入驻 | 广告服务 | 手机京东 | 友情链接 | 销售联盟 | 京东社区 | 京东公益 | English Site</p>
        <p>Copyright © 2004-2017 京东JD.com 版权所有</p>
    </footer>
    <script src="bootstrap/js/jquery.js"></script>
    <script src="bootstrap/js/bootstrap.min.js"></script>
     <script src="bootstrap/js/jquery.cookie.js"></script>
    <script>
 $('form').submit(function(e){
             e.preventDefault();
             var petname=$.cookie('username');
             if(petname){
                 alert('用户已经登录！不能重复登录');
             }
            else{
                 $.post(this.action,$(this).serialize(),(data)=>{
              if( data.code=='success'){
                     //  登录成功跳转到首页
                    location.href='/';
              }
              else{
                    alert('用户不存在，请注册');
              }
             })
            }
         })
    </script>
</body>

</html>